package com.gzist.elderlyserviceplatform.controller.client;

import com.gzist.elderlyserviceplatform.common.Result;
import com.gzist.elderlyserviceplatform.service.ActivityRegistrationService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 活动报名表
 */
@RestController
@Tag(name = "活动报名管理")
@RequestMapping("/api/client/activityRegistration")
@RequiredArgsConstructor
public class ActivityRegistrationControllerC {

        private final ActivityRegistrationService activityRegistrationService;

        @GetMapping("/AddActivityRegistration/{id}")
        @Operation(summary = "报名参加活动")
        public Result addActivityRegistration(
                @PathVariable("id")
                @Parameter(description = "活动ID") String activity_id
        ) {
                activityRegistrationService.activityRegistrationService(activity_id);
                return Result.success("报名成功");
        }
}